package com.sinoglobal.wallet.adapter;


import java.util.ArrayList;
import java.util.List;

import com.sinoglobal.wallet.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class W_BankSeleAdapter extends BaseAdapter{
	List list = new ArrayList();
	Context context;
	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}

	public W_BankSeleAdapter(Context context) {
		super();
		this.context = context;
	}

	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return list.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int paramInt, View paramView, ViewGroup paramViewGroup) {
		HoldView  vh;
		if(paramView == null){
			vh = new HoldView();
			paramView = LayoutInflater.from(context).inflate(R.layout.wallet_bank_select_item, null);
			vh.tv = (TextView) paramView.findViewById(R.id.bankSelect_itemTv);
			paramView.setTag(vh);
		}else{
			vh = (HoldView) paramView.getTag();
		}
		vh.tv.setText(list.get(paramInt).toString());
		return paramView;
	}

	class HoldView{
		TextView tv;
	}
}
